import request from "@/utils/request";

// 查询任务列表---模糊查询
export function listTaks(params) {
  return request({
    url: "/project/task/list",
    method: "get",
    params,
  });
}
// 查询任务列表---模糊查询---首页
export function getHomeListTaks(params) {
  return request({
    url: "/practice/user/getHomePageCheck",
    method: "post",
    params,
  });
}
// 查询任务列表
export function selectorListTaks(params) {
  return request({
    url: "/project/task/selectorForList",
    method: "get",
    params
  });
}

// 新增任务
export function savaTaks(data) {
  return request({
    url: "/project/task",
    method: "post",
    data,
  });
}

// 编辑
export function updateTaks(data) {
  return request({
    url: "/project/task",
    method: "put",
    data,
  });
}

// 删除
export function deleteTaks(ids) {
  return request({
    url: `/project/task/${ids}`,
    method: "delete",
  });
}


// 查看详情
export function detailTaks(id) {
  return request({
    url: `/project/task/${id}`,
    method: 'get'
  })
}

// 分配实践课程
export function assignCategory() {
  return request({
    url: "/project/config/list",
    method: "get",
  });
}
export function getAuthList(params) {
  return request({
    url: "project/auth/getAuthList",
    method: "get",
    params,
  });
}
// 获取权限
export function categoryAuth(params) {
  return request({
    url: "/project/auth/list",
    method: "get",
    params
  });
}
// 分配实践权限
export function assignCategoryAuth(data) {
  return request({
    url: "/project/auth",
    method: "post",
    data
  });
}
// 学院数据
export function getPerformanceXy(data) {
  return request({
    url: "/practice/user/performanceXy",
    method: "post",
    data
  });
}
// 专业数据
export function getPerformanceZy(data) {
  return request({
    url: "/practice/user/performanceZy",
    method: "post",
    data
  });
}
// 班级数据
export function getPerformanceBj(data) {
  return request({
    url: "/practice/user/performanceBj",
    method: "post",
    data
  });
}
// 学生数据
export function getPerformanceXs(data) {
  return request({
    url: "/practice/user/performanceXs",
    method: "post",
    data
  });
}

// 新增任务获取学生
export function getStudentList(data) {
  return request({
    url: "/project/prouser/getStudentTree",
    method: "post",
    data,
  });
}

// 查询选择学生
export function getSelecStudentList(id) {
  return request({
    url: `/project/apply/checkedStudentList`,
    method: "get",
    params: {
      id
    }
  });
}
